<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="jquery.min.js"></script>
    <style>
        div {
            width: 200px;
            height: 200px;
            background-color: #fecc5b;
            padding: 10px;
            border: 15px solid red;
            margin: 20px;
        }
    </style>
</head>
<body>
   <div></div>
   <script>
       $(function () {
           //设置获取宽高 width() height()
           console.log($("div").width());
           $("div").width(300);
           console.log($("div").width());
           $("div").height(300);

           //innerHeight()和innerWidth()打印出来的是 高/宽 + margin
           console.log($("div").innerHeight());
           console.log($("div").innerWidth());

           //outerHight() 和outerWidth() 获取或者设置高/宽+padding + border*2的大小
           console.log($("div").outerHeight());
       })
   </script>
</body>
</html>